{% extends "base_dialog.html" %}

{% block title %}{% endblock %}

{% block content %}
    <h2 style="margin-top: 0px;margin-bottom: 4px;">Add new {{ type }} {% if error %}failed{% else %}successful{% endif %}</h2>
    {% if error %}
        <h4>{{ error }}</h4>{% endif %}
    {% if question %}
            <div class="tip">Question:</div>
            <div class="quest">{{ question.text|linebreaksbr }}</div>
            <div class="indent1">
        <p class="subhead">Your {{ type }}:</p>
    {% endif %}
    <div class="state">{{ text }}</div>
    {% if tags %}
        <div class="tip"><br>Tags:
        {% for tag in tags %}<span class="tag">{{ tag }}</span> {% endfor %}
    {% endif %}
    {% if question %}</div>{% endif %}
    <h2>
        {% if error %}<a href="javascript:javascript:history.go(-1)"
                         data-icon="arrow-l"
                         data-role="button"
                         data-inline="true">Go back</a>
            {% else %}<a href="{{ next }}&rnd={{ rnd }}"
                         data-role="button"
                         data-theme="b"
                         data-icon="check"
                         data-inline="true">Go next</a>{% endif %}
    </h2>
{% endblock %}